<?php
if ($title == t('Access denied')) header( 'Location: /user?destination=' . substr ($_SERVER['REQUEST_URI'],1 ) );
$secondary_links = '<div class="secondary-links">' . menu_tree('secondary-links') . '</div>';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language; ?>" xml:lang="<?php print $language->language; ?>">
    <head>
      <title><?php print $head_title; ?></title>
      <?php print $head; ?>
      <?php print $styles; ?>
      <?php print $scripts; ?>
      <?php print _sky_conditional_stylesheets(); ?>
    </head>
  <body class="both">

  <div id="wrapper">
    <div id="header">
      <?php if ($contenttop) { ?>
        <div id="headerright">
          <?php print $headerright; ?>
        </div>
        <div id="contenttop">
          <?php print $contenttop; ?>
        </div>
      <?php } ?>
      <img src="<?php print $logo; ?>" alt="<?php print $site_name; ?>" class="logo" />
      <h1>
        <a href="<?php print $base_path; ?>" title="<?php print $site_name; ?>"><?php print $site_name; ?></a>
      </h1>
      <br /><div class="slogan"><?php print $site_slogan; ?> </div>
    </div>
    <div id="navigation">
      <?php if ($logged_in) {print $primary_links;}
        global $user;
        if (in_array('committee', $user->roles) || !$logged_in){
        print '<div class="visitors wrap-center">'.menu_tree('visitors') .'</div>';
      } ?>
    </div>
    <div class="container">
      <?php if ($left): ?>
        <div id="sidebar-left" class="sidebar">
            <?php print $left; ?>
        </div>
      <!-- END HEADER -->
      <?php endif; ?>
      <div id="main">
        <div class="main-inner">
          <?php if ($show_messages && $messages != ""): ?>
            <?php print $messages; ?>
          <?php endif; ?>
          <?php if ($title): ?>
            <h1 class="title"><?php print $title; ?></h1>
          <?php endif; ?>
          <?php if ($help): ?>
            <div class="help"><?php print $help; ?></div>
          <?php endif; ?>
          <?php print $tabs; ?>
          <div id="content">
            <?php print $content; ?>
          </div>
          <!-- END CONTENT -->
          <?php if ($feed_icons): ?>
            <div id="feed-icons">
              <?php print $feed_icons; ?>
            </div>
          <?php endif; ?>
          <?php if ($contentbottom): ?>
            <div id="content-bottom"><?php print $contentbottom; ?></div>
          <?php endif; ?>
        </div>
        <!-- END MAIN INNER -->
      </div>
      <!-- END MAIN -->
      <?php if ($right): ?>
        <div id="sidebar-right" class="sidebar">
          <?php print $right; ?>
        </div>
      <!-- END SIDEBAR RIGHT -->
      <?php endif; ?>
    </div>
    <!-- END CONTAINER -->
    <div class="push">&nbsp;</div>
  </div>
  <!-- END WRAPPER -->
  <div id="footer">
    <div id="footer-content">
    <?php print $contentfooter; ?>
    <?php print $footer; ?>
    </div>
    <div class="bottom">
      <span class="fl">&nbsp;</span>
      <span class="middle">&nbsp;</span>
      <span class="fr">&nbsp;</span>
    </div>
    <div id="credit"><?php print $cforge_footer; ?></div>
  </div>
  <?php print $closure; ?>
  </body>
</html>
